﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Data;

namespace ESC.Designer.Resources
{
    public class MachineRepairConvert : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
            {
                return "错误";
            }
            else
           if (value.ToString() == "0")
            {
                return "叫修中";
            }
            else if (value.ToString() == "1")
            {
                return "維修中";
            }
            else if (value.ToString() == "2")
            {
                return "線上完成維修";
            }
            else 
            {
                return "完成維修";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public enum MachineRepair
    {
        叫修中 = '0',
        維修中 = '1',
        線上完成維修='2',
        完成維修='3'
    }
}
